package com.javasm.springmybatis.controller;


import com.javasm.springmybatis.entity.Admin;
import com.javasm.springmybatis.service.IAdminService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author whl
 * @since 2021-11-08
 */
@RestController
@RequestMapping("/admin")
public class AdminController {

    @Resource
    private IAdminService adminService;

    @GetMapping("list")
    public List<Admin> list(){

        return adminService.selectList();
    }



}
